﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DiskInspector.Model.MetaDataAttributes;

namespace DiskInspector.Model
{
    public class DOSBootRecord
    {
        [FieldLength(ByteLength = 3)]
        public byte[] JMPInstruction { get; set; }

        [FieldLength(ByteLength = 8)]
        public char[] FileSystemID { get; set; }

        [FieldLength(ByteLength = 2)]
        public ushort BytesPerSector { get; set; }

        [FieldLength(ByteLength = 1)]
        public byte SectorsPerCluster { get; set; }

        [FieldLength(ByteLength = 2)]
        public byte[] ReservedSectors { get; set; }

        [FieldLength(ByteLength = 3)]
        public byte[] AlwaysZero1 { get; set; }

        [FieldLength(ByteLength = 2)]
        public byte[] Unused1 { get; set; }

        [FieldLength(ByteLength = 1)]
        public byte MediaDescriptor { get; set; }

        [FieldLength(ByteLength = 2)]
        public byte[] AlwaysZero2 { get; set; }

        [FieldLength(ByteLength = 2)]
        public ushort SectorsPerTrack { get; set; }

        [FieldLength(ByteLength = 2)]
        public ushort Heads { get; set; }

        [FieldLength(ByteLength = 4)]
        public uint HiddenSectors { get; set; }

        [FieldLength(ByteLength = 4)]
        public byte[] Unused2 { get; set; }

        [FieldLength(ByteLength = 4)]
        public byte[] Unused3 { get; set; }

        [FieldLength(ByteLength = 8)]
        public long TotalSectors { get; set; }

        [FieldLength(ByteLength = 8)]
        public long StartClusterNumberMFT { get; set; }

        [FieldLength(ByteLength = 8)]
        public long StartClusterNumberMFTMirr { get; set; }

        [FieldLength(ByteLength = 1)]
        public sbyte FileRecordSizeIndicator { get; set; }

        [FieldLength(ByteLength = 3)]
        public byte[] Unused4 { get; set; }

        [FieldLength(ByteLength = 1)]
        public sbyte IndexBufferSizeIndicator { get; set; }

        [FieldLength(ByteLength = 3)]
        public byte[] Unused5 { get; set; }

        [FieldLength(ByteLength = 8)]
        public byte[] SerialNumber { get; set; }

        [FieldLength(ByteLength = 4)]
        public int CheckSum { get; set; }

        [FieldLength(ByteLength = 426)]
        public byte[] BootstrapLoaderCode { get; set; }

        [FieldLength(ByteLength = 2)]
        public byte[] Signature { get; set; }

    }
}
